Pen state detection circuit, system, and method

ABSTRACT

Provided are a pen state detection circuit, a pen state detection system, and a pen state detection method that can improve estimation accuracy for a pen state in an electronic pen including at least one electrode. A pen state detection circuit acquires, from a touch sensor, a first signal distribution indicating a change in capacitance associated with approach of a first electrode and uses a machine learning estimator to estimate an instruction position or an inclination angle of an electronic pen from first feature values related to the first signal distribution. The first feature values include first local feature values related to a first local distribution corresponding to sensor electrodes in a number fewer than the number of arranged sensor electrodes exhibiting the first signal distribution.

BACKGROUND Technical Field

The present disclosure relates to a pen state detection circuit, a penstate detection system, and a pen state detection method.

Description of the Related Art

An electronic device is disclosed in Patent Document 1. The electronicdevice detects a first position where a hand of a user comes intocontact with a detection surface of a touch sensor and a second positionindicated by an electronic pen, uses coordinate values of the firstposition and the second position to estimate an inclination direction ofthe electronic pen, and corrects an instruction position of theelectronic pen according to the inclination direction.

PRIOR ART DOCUMENT Patent Document

Patent Document 1: Japanese Patent Laid-Open No. 2015-087785

BRIEF SUMMARY Technical Problem

Incidentally, an electronic pen including two electrodes can be used toestimate the position and the posture of the electronic pen even whenthe hand of the user is not touching the detection surface. However, thetwo electrodes are physically separated, and thus, at least oneelectrode always does not come into contact with the detection surfacewhen the electronic pen is being used. In this case, the relationbetween the inclination angle and the detection position of theelectronic pen may change according to the three-dimensional shapes ofthe electrodes, and the estimation accuracy may vary depending on theposition and the posture of the electronic pen.

An object of the present disclosure is to provide a pen state detectioncircuit, a pen state detection system, and a pen state detection methodthat can improve estimation accuracy for a pen state in an electronicpen including at least one electrode.

Technical Solution

A first present disclosure provides a pen state detection circuit thatdetects a state of an electronic pen including a first electrode, on thebasis of a signal distribution detected by a capacitance touch sensorincluding a plurality of sensor electrodes arranged in a plane shape,the pen state detection circuit executing an acquisition step ofacquiring, from the touch sensor, a first signal distribution indicatinga change in capacitance associated with approach of the first electrode;and an estimation step of using a machine learning estimator to estimatean instruction position or an inclination angle of the electronic penfrom first feature values related to the first signal distribution, inwhich the first feature values include first local feature valuesrelated to a first local distribution corresponding to sensor electrodesin a number fewer than the number of arranged sensor electrodesexhibiting the first signal distribution.

A second present disclosure provides a pen state detection systemincluding an electronic device including the pen state detectioncircuit; an electronic pen used along with the electronic device; and aserver apparatus that is configured to be capable of performing two-waycommunication with the electronic device and that storing learningparameter groups of an estimator constructed on the pen state detectioncircuit, in which the electronic device requests the server apparatus totransmit a learning parameter group corresponding to the electronic penwhen the electronic pen is detected.

A third present disclosure provides a pen state detection method ofdetecting a state of an electronic pen including an electrode, on thebasis of a signal distribution detected by a capacitance touch sensorincluding a plurality of sensor electrodes arranged in a plane shape, inwhich one or a plurality of processors execute an acquisition step ofacquiring, from the touch sensor, a signal distribution indicating achange in capacitance associated with approach of the electrode; and anestimation step of using a machine learning estimator to estimate aninstruction position or an inclination angle of the electronic pen fromfeature values related to the signal distribution, and the featurevalues include local feature values related to a local distributioncorresponding to sensor electrodes in a number fewer than the number ofarranged sensor electrodes exhibiting the signal distribution.

A fourth present disclosure provides a pen state detection circuit thatdetects a state of an electronic pen including an electrode, on thebasis of a signal distribution detected by a capacitance touch sensorincluding a plurality of sensor electrodes arranged in a plane shape,the pen state detection circuit executing an acquisition step ofacquiring, from the touch sensor, a signal distribution indicating achange in capacitance associated with approach of the electrode; and anestimation step of estimating an instruction position or an inclinationangle of the electronic pen from feature values related to the signaldistribution by following different computation rules according to aprojection position of the electrode on a detection surface of the touchsensor.

A fifth present disclosure provides a pen state detection systemincluding an electronic device including the pen state detectioncircuit; an electronic pen used along with the electronic device; and aserver apparatus that is configured to be capable of performing two-waycommunication with the electronic device and storing learning parametergroups of an estimator constructed on the pen state detection circuit,in which the electronic device requests the server apparatus to transmita learning parameter group corresponding to the electronic pen when theelectronic pen is detected.

A sixth present disclosure provides a pen state detection method ofdetecting a state of an electronic pen including an electrode, on thebasis of a signal distribution detected by a capacitance touch sensorincluding a plurality of sensor electrodes arranged in a plane shape, inwhich one or a plurality of processors execute an acquisition step ofacquiring, from the touch sensor, a signal distribution indicating achange in capacitance associated with approach of the electrode; and anestimation step of estimating an instruction position or an inclinationangle of the electronic pen from feature values related to the signaldistribution by following different computation rules according to aprojection position of the electrode on a detection surface of the touchsensor.

Advantageous Effects

According to the first to third present disclosures, the machinelearning estimator can be used to extract potential detection patternsthrough machine learning, and this facilitates appropriate reflection ofthe tendency of the detection patterns in estimating the instructionposition or the inclination angle. Thus, the pen state of the electronicpen including at least one electrode can be estimated with highaccuracy. In addition, the local feature values related to the localdistribution corresponding to the sensor electrodes in a number fewerthan the number of arranged sensor electrodes exhibiting the signaldistribution can be used to reduce the processing load of the estimatorto which the local feature values are input.

According to the fourth to sixth present disclosures, an estimatesuitable for the projection position can be made by application ofdifferent computation rules according to the projection position of theelectrode included in the electrode pen, and this suppresses thereduction in the estimation accuracy for the pen state caused by therelative positional relation between the electronic pen and the touchsensor. Therefore, the pen state of the electronic pen including atleast one electrode can be estimated with high accuracy.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is an overall configuration diagram of an input system common toembodiments of the present disclosure.

FIG. 2 is a schematic diagram partially illustrating an electronic penof FIG. 1 .

FIGS. 3A and 3B are diagrams illustrating an example of signaldistributions detected by a touch sensor in a contact state of theelectronic pen.

FIG. 4 is a diagram illustrating a tendency of an estimation errorrelated to an instruction position.

FIG. 5 is a block diagram illustrating a pen detection functionaccording to a first embodiment.

FIG. 6 is a flow chart executed by the pen detection functionillustrated in FIG. 5 .

FIG. 7 is a diagram illustrating an example of signal distributionsacquired from the touch sensor.

FIGS. 8A-8C are diagrams illustrating an example of a calculation methodof local feature values.

FIG. 9 is a diagram illustrating a configuration of an estimatorincluded in the pen detection function of FIG. 5 .

FIG. 10 is a diagram illustrating an implementation example of theestimator in FIG. 9 .

FIG. 11A is a diagram illustrating estimation accuracy of theinstruction position according to a conventional example. FIG. 11B is adiagram illustrating estimation accuracy of the instruction positionaccording to the embodiments.

FIG. 12A is a block diagram illustrating a pen detection functionaccording to a first modification of the first embodiment. FIG. 12B is adiagram illustrating a configuration of an estimator included in the pendetection function of FIG. 12A.

FIG. 13A is a block diagram illustrating a pen detection functionaccording to a second modification of the first embodiment. FIG. 13B isa diagram illustrating a configuration of an estimator included in thepen detection function of FIG. 13A.

FIG. 14A is a block diagram illustrating a pen detection functionaccording to a third modification of the first embodiment. FIG. 14B is adiagram illustrating a configuration of an estimator included in the pendetection function of FIG. 14A.

FIG. 15 is a diagram illustrating a configuration of an estimatorincluded in a pen detection function according to a fourth modificationof the first embodiment.

FIG. 16 is a block diagram illustrating a pen detection functionaccording to a second embodiment.

FIG. 17 is a flow chart executed by the pen detection functionillustrated in FIG. 16 .

FIG. 18 is a diagram illustrating an example of a definition of a sensorarea included in the touch sensor.

FIG. 19A is a diagram illustrating local feature values when aprojection position of a tip electrode (FIG. 2 ) included in theelectronic pen is in a general area. FIG. 19B is a diagram illustratinglocal feature values when the projection position of the tip electrodeis in a peripheral area.

FIG. 20 is a block diagram illustrating a pen detection functionaccording to a modification of the second embodiment.

FIG. 21A is a diagram illustrating local feature values before a shiftprocess.

FIG. 21B is a diagram illustrating local feature values after the shiftprocess.

FIG. 22A is a block diagram illustrating a pen detection functionaccording to a third embodiment. FIG. 22B is a block diagramillustrating an example different from that of FIG. 22A.

FIG. 23 is a flow chart executed by the pen detection functionillustrated in FIG. 22 .

FIG. 24 is a diagram illustrating a configuration of an estimatorincluded in the pen detection function of FIG. 22 .

FIGS. 25A and 25B are diagrams illustrating variations of local featurevalues before execution of an autoencoding process.

FIGS. 26A and 26B are diagrams illustrating variations of local featurevalues after the execution of the autoencoding process.

FIG. 27A is a diagram illustrating estimation accuracy for theinstruction position according to a reference example. FIG. 27B is adiagram illustrating estimation accuracy for the instruction positionaccording to the embodiments.

FIG. 28 is an overall configuration diagram of an input system as a penstate detection system according to a fourth embodiment.

FIG. 29 is a functional block diagram related to a learning process of acontrol unit illustrated in FIG. 28 .

FIG. 30 is a diagram illustrating a first example of a setting method ofa learning parameter group.

FIG. 31 is a diagram illustrating a second example of the setting methodof the learning parameter group.

DETAILED DESCRIPTION

A pen state detection circuit, a pen state detection system, and a penstate detection method according to the present disclosure will bedescribed with reference to the attached drawings. To facilitate theunderstanding of the description, the same reference signs are providedas much as possible to the same constituent elements and steps in thedrawings, and the description may not be repeated. Note that the presentdisclosure is not limited to the following embodiments andmodifications, and it is obvious that the present disclosure can freelybe changed without departing from the scope of the disclosure.Alternatively, the configurations may be combined optionally as long asthere is no technical contradiction.

Configuration Common to Embodiments Overall Configuration of InputSystem 10

FIG. 1 is an overall configuration diagram of an input system 10 commonto the embodiments of the present disclosure. The input system 10basically includes an electronic device 12 including a touch paneldisplay; and an electronic pen 14 (or, also referred to as a “stylus”)that is a pen-type pointing device.

The electronic device 12 includes, for example, a tablet terminal, asmartphone, and a personal computer. The user can hold the electronicpen 14 with one hand and move the electronic pen 14 while pressing thepen tip against the touch surface of the electronic device 12 to therebydepict pictures and write letters on the electronic device 12. Inaddition, the user can touch the touch surface with a finger 16 of theuser to perform a desired operation through a user controller beingdisplayed.

The electronic device 12 includes a touch sensor 18, a touch IC(Integrated Circuit) 20, and a host processor 22. An x-direction and ay-direction illustrated in FIG. 1 correspond to an X-axis and a Y-axisof a Cartesian coordinate system (hereinafter, sensor coordinate system)defined on the detection surface of the touch sensor 18.

The touch sensor 18 is a planar sensor including a plurality ofelectrodes arranged on a display panel not illustrated. The touch sensor18 includes a plurality of line electrodes 18 x for detecting anX-coordinate (position in the x-direction) and a plurality of lineelectrodes 18 y for detecting a Y-coordinate (position in they-direction). The plurality of line electrodes 18 x are extended in they-direction and arranged at equal intervals in the x-direction. Theplurality of line electrodes 18 y are extended in the x-direction andarranged at equal intervals in the y-direction. Hereinafter, thearrangement interval of the line electrodes 18 x (or line electrodes 18y) will be referred to as a “pitch” in some cases. Note that the touchsensor 18 may be a self-capacitance sensor including block-likeelectrodes arranged in a two-dimensional grid, instead of the mutualcapacitance sensor.

The touch IC 20 is an integrated circuit that can execute firmware 24and is connected to each of the plurality of line electrodes 18 x and 18y included in the touch sensor 18. The firmware 24 can realize a touchdetection function 26 of detecting a touch of the finger 16 of the useror the like and a pen detection function 28 of detecting the state ofthe electronic pen 14.

The touch detection function 26 includes, for example, a scan functionof the touch sensor 18, a creation function of a heat map(two-dimensional distribution of a detection level) on the touch sensor18 and an area classification function (for example, classification ofthe finger 16 and palm) on the heat map. The pen detection function 28includes, for example, a scan function (global scan or local scan) ofthe touch sensor 18, a reception and analysis function of a downlinksignal, an estimation function of the state (for example, position,posture, and pen pressure) of the electronic pen 14, and a generationand transmission function of an uplink signal including a command forthe electronic pen 14.

The host processor 22 is a processor including a CPU (Central ProcessingUnit) or a GPU (Graphics Processing Unit). The host processor 22 readsprograms from a memory not illustrated and executes the programs tothereby perform, for example, a process of using data from the touch IC20 to generate digital ink, a visualization process for displayingdrawing content indicated by the digital ink, and the like.

Estimation Method for Pen State

FIG. 2 is a schematic diagram partially illustrating the electronic pen14 of FIG. 1 . A tip electrode 30 in a substantially conical shape andan upper electrode 32 in a bottomless truncated conical shape arecoaxially provided at the tip of the electronic pen 14. Each of the tipelectrode 30 and the upper electrode 32 is an electrode for outputting asignal (what is generally called a downlink signal) generated by anoscillation circuit 34. The oscillation circuit 34 changes theoscillation frequency or switches the destination in time series, andthis allows the electronic pen 14 to output two types of downlinksignals through the tip electrode 30 and the upper electrode 32.

The touch IC 20 (FIG. 1 ) of the electronic device 12 acquires, from thetouch sensor 18, a signal distribution (hereinafter, referred to as a“first signal distribution”) indicating a change in capacitance (morespecifically, mutual capacitance or self-capacitance) associated withapproach of the tip electrode 30. The first signal distributiontypically has a shape including one peak at a position Q1. Here, theposition Q1 corresponds to a position of projection of the top (positionP1) of the tip electrode 30 onto the sensor plane.

Similarly, the touch IC 20 (FIG. 1 ) of the electronic device 12acquires, from the touch sensor 18, a signal distribution (hereinafter,referred to as a “second signal distribution”) indicating a change incapacitance associated with approach of the upper electrode 32. Thesecond signal distribution typically has a shape including one or twopeaks at a position Q2. Here, the position Q2 corresponds to a positionof projection of the shoulder (position P2) of the upper electrode 32onto the sensor plane. In addition, a position Q3 described latercorresponds to a position of projection of the center (position P3) ofthe upper bottom surface of the upper electrode 32 onto the sensorplane.

FIG. 3 depicts diagrams illustrating an example of the signaldistributions detected by the touch sensor 18 in the contact state ofthe electronic pen 14. More specifically, FIG. 3A illustrates firstsignal distributions, and FIG. 3B illustrates second signaldistributions. The horizontal axis of the graph represents relativepositions (unit: mm) with respect to the instruction position of theelectronic pen 14, and the vertical axis of the graph represents signalvalues (unit: none) normalized to [0, 1]. The plus and minus signs aredefined such that the signal value is “positive” when the electronic pen14 approaches. The shapes of the first and second signal distributionschange according to the inclination angle of the electronic pen 14. InFIGS. 3A and 3B, three curves obtained by changing the inclination angleare displayed on top of each other.

As illustrated in FIG. 3A, the first signal distributions havesubstantially similar shapes regardless of the size of the inclinationangle. This is because the top of the tip electrode 30 is usually at aposition closest to the sensor plane, when the electronic pen 14 isbeing used, and the position Q1 substantially coincides with theposition P1. On the other hand, as illustrated in FIG. 3B, the positionor the number of peaks in the second signal distributions significantlyvaries according to the change in inclination angle. This is becausepart of the shoulder of the upper electrode 32 is usually at a positionclosest to the sensor plane, when the electronic pen 14 is being used,and the distance between the positions Q1 and Q2 varies according to theinclination angle.

The coordinates of the positions Q1 and Q2 can be used to estimate theposition and the posture (hereinafter, also referred to as a pen state)of the electronic pen 14. For example, the instruction positioncorresponds to the position Q1 illustrated in FIG. 2 . In addition, theinclination angle corresponds to an angle 0 formed by the sensor planeand the axis of the electronic pen 14. More specifically, the angle θ isequal to 0° when the electronic pen 14 is parallel to the sensor plane,and the angle θ is equal to 90° when the electronic pen 14 isperpendicular to the sensor plane. Note that, other than the angle, theazimuth may be used as the physical quantity indicating the tilt stateof the electronic pen 14, for example.

FIG. 4 is a diagram illustrating a tendency of an estimation errorrelated to the instruction position. The horizontal axis of the graphrepresents actual values (unit: mm) of the instruction position, and thevertical axis of the graph represents estimated values (unit: mm) of theinstruction position. Here, the midpoint of the line electrode 18 x inthe width direction is defined as X=0 (mm). Note that, when theestimation error is 0, a straight line with a tilt of 1 passing throughan origin O is obtained.

The signal distribution is, for example, a set of signal values sampledat equal intervals (pitch ΔX), and an interpolation operation isperformed to more accurately estimate the peak of the signaldistribution (that is, an instruction position). However, a fittingerror occurs depending on the type of interpolation function, andperiodical “interpolation approximation errors” occur in pitches.

In addition, when the inclination angle is estimated on the basis of theposition P3 (see FIG. 2 ) of the upper electrode 32, the position Q2coincides with the position Q3 where θ=0°, and there is no estimationerror caused by the inclination angle. However, in a case where θ>0°,the estimated inclination angle is small due to the deviation of thepositions Q2 and Q3. As a result, the obtained estimated value isshifted in the positive direction (that is, an inclination direction ofthe electronic pen 14), and what is generally called an “offset error”occurs.

In this way, when two electrodes at different positions and shapes areused to estimate the pen state, the estimation accuracy of theinstruction position or the inclination angle may vary due to theinterpolation approximation error and the offset error. Thus, a methodthat reduces these two types of errors at the same time to improve theestimation accuracy of the pen state is proposed.

First Embodiment

Hereinafter, a pen detection function 28A of the touch IC 20 accordingto a first embodiment will be described with reference to FIGS. 5 to 11.

Configuration and Operation

FIG. 5 is a block diagram illustrating the pen detection function 28Aaccording to the first embodiment. The pen detection function 28Aincludes a signal acquisition unit 40, a feature value calculation unit42, an angle estimation unit 44, and a position estimation unit 46.Next, an operation of the touch IC 20 associated with execution of thepen detection function 28A will be described with reference to a flowchart of FIG. 6 .

In step S1 of FIG. 6 , the signal acquisition unit 40 acquires, from thetouch sensor 18, the first signal distribution and the second signaldistribution through the scan operation of the line electrodes 18 x and18 y. The signal distributions may be one-dimensional signaldistributions along the X-axis or the Y-axis or may be two-dimensionalsignal distributions on the XY-axis plane. Here, an example ofone-dimensional signal distributions along the X-axis will be described.

FIG. 7 is a diagram illustrating an example of signal distributionsacquired from the touch sensor 18. The horizontal axis of the graphrepresents line numbers (that is, identification numbers of lineelectrodes 18 x), and the vertical axis of the graph represents signalvalues. In the situation illustrated here, two electronic pens 14 aredetected at the same time. In this case, two peaks with narrow widthsare generated in the signal distributions, around the instructionpositions of the electronic pens 14. On the other hand, the signalvalues are 0 or small values at remaining positions excluding the twopeaks. Hereinafter, the entire signal distribution may be referred to asan “entire distribution,” and a local signal distribution with arelatively large change in capacitance may be referred to as a “localdistribution.” Here, “relatively large” may be that the amount of changeis larger than that at positions other than the local distribution ormay be that the amount of change is larger than a predeterminedthreshold.

From another point of view, the “entire distribution” is a signaldistribution corresponding to all of the arranged line electrodes 18 x,and the “local distribution” is a signal distribution corresponding topart of the arranged line electrodes 18 x. The ratio (n/N) of the numberof electrodes n exhibiting the local distribution to the number ofelectrodes N exhibiting the entire distribution is preferably, forexample, equal to or smaller than ½, more preferably, equal to orsmaller than ¼, and yet more preferably, equal to or smaller than ⅛.

In other words, the numbers of line electrodes 18 x and 18 y exhibitingthe local distribution are smaller than the numbers of arranged lineelectrodes 18 x and 18 y exhibiting the entire distribution. Here,“small” denotes that, when, for example, the sensor electrodes include Nrows vertically×M columns horizontally (for example, 50 rows×70columns),

-   -   [1] level values of current or voltage of less than N        electrodes, preferably, less than N/2 electrodes, more ideally,        less than 10 electrodes, are used to determine the coordinate in        the vertical direction, and

[2] level values of current or voltage of less than M electrodes,preferably, less than M/2 electrodes, more ideally, less than 10electrodes, are used to determine the coordinate in the horizontaldirection.

It is desirable that the numbers be the same in the vertical directionand the horizontal direction. In this way, for example, in the case ofthe 50×70 sensor electrodes in the example described above, thetwo-dimensional coordinates can be obtained by learning of, for example,10+10, as compared to learning of a neural network corresponding to thenumber of states of cross points (the number of inputs of 3,500). Theorder of the number of calculations, such as the number ofmultiplications, computed in the neural network can be reduced fromexponential (square) to linear (10+10).

Note that, when the sensor electrodes include N block electrodesvertically and M block electrodes horizontally, level values of currentor voltage of less than N electrodes in the vertical direction,preferably, less than N/2 electrodes in the vertical direction, and moreideally, less than 10 electrodes in the vertical direction, are used.

In step S2, the feature value calculation unit 42 uses the first signaldistribution acquired in step S1, to calculate feature values(hereinafter, referred to as “first feature values”) indicating theshape feature of the first signal distribution. Similarly, the featurevalue calculation unit 42 uses the second signal distribution acquiredin step S1, to calculate feature values (hereinafter, referred to as“second feature values”) indicating the shape feature of the secondsignal distribution.

As illustrated in FIG. 8A, it is assumed that the obtained signaldistribution includes S_(n−2)=0.15/Sn_(n−1)=0.40/S_(n)=0.80/Sn₊₁=0.30/Sn_(n+2)=0.10 in ascending order ofline number. Note that the signal values in other line numbers are 0 orsmall values that can be ignored. {G_(i)} and {F_(i)} are calculatedaccording to, for example, the following Equations (1) and (2).

G _(i)=(S _(i) −S _(i−2))+(S _(i−1) +S _(i−3))  (1)

F _(i) =|G _(i)|/max{|G_(i)|}  (2)

As a result, a “tilt with sign” {G_(i)} illustrated in FIG. 8B and afeature value {F_(i)} illustrated in FIG. 8B are calculated. As can beunderstood from Equation (2), the feature value {F_(i)} corresponds tothe “tilt without sign” normalized in the range of [0, 1].

Note that the feature value calculation unit 42 may calculate variousfeature values characterizing the shape of the signal distributioninstead of the tilts of the signal distribution or the absolute valuesof the tilts. In addition, the feature value calculation unit 42 may usethe same calculation method as in the case of the first feature valuesto calculate the second feature values or may use a calculation methoddifferent from the case of the first feature values to calculate thesecond feature values. In addition, the feature values may be the signaldistribution itself. Although the feature value calculation unit 42calculates one feature value for each of the line electrodes 18 x and 18y, the relation between the number of line electrodes 18 x and 18 y andthe number of feature values is not limited to the example. That is,instead of the one-to-one relation, the relation may be a one-to-many,many-to-one, or many-to-many relation.

Here, the feature value calculation unit 42 uses only the localdistributions to calculate the feature values (hereinafter, referred toas “local feature values”) and reduce the number of feature values usedfor estimation described later. Specifically, the feature valuecalculation unit 42 may extract the local distributions from the entiredistribution and then use the local distributions to calculate the localfeature values or may calculate the feature values across the entiredistribution and then extract the local feature values corresponding tothe local distributions. The local feature values may include a certainnumber of pieces of data (for example, N pieces) regardless of thenumber of arranged line electrodes 18 x and 18 y. The constant number ofdata used for estimation can make a uniform estimate independent of theconfiguration of the touch sensor 18.

When the local feature values are used, the first feature values includefirst local feature values and a reference position, and the secondfeature values include second local feature values. The “first localfeature values” denote local feature values related to only the localdistribution (that is, the first local distribution) included in thefirst signal distribution. The “second local feature values” denotelocal feature values related to only the local distribution (that is,the second local distribution) included in the second signaldistribution. The “reference position” denotes a position of a referencepoint of the first local distribution in the sensor coordinate system,and the “reference position” may be, for example, one of a risingposition, a falling position, and a peak position of the first localdistribution or may be a neighborhood position of these.

In step S3 of FIG. 6 , the angle estimation unit 44 estimates theinclination angle of the electronic pen 14 from the second featurevalues calculated in step S2. Further, the feature value calculationunit 42 estimates the instruction position of the electronic pen 14 fromthe first feature values and the inclination angle. A machine learningestimator 50 is used to estimate the pen state. The machine learning maybe, for example, “learning with training” in which training dataobtained by actual measurement or calculation simulation is used.

FIG. 9 is a diagram illustrating a configuration of the estimator 50included in the pen detection function 28A of FIG. 5 . The estimator 50includes a former computation element 52, a latter computation element54, and an adder 56 sequentially connected in series. The formercomputation element 52 corresponds to the angle estimation unit 44illustrated in FIG. 5 , and the latter computation element 54 and theadder 56 correspond to the position estimation unit 46 illustrated inFIG. 5 .

Note that circles in FIG. 9 represent computation units corresponding toneurons of the neural network. The values of the “first local featurevalues” corresponding to the tip electrode 30 are stored in thecomputation units with “T.” The values of the “second local featurevalues” corresponding to the upper electrode 32 are stored in thecomputation units with “U.” The “inclination angle” is stored in thecomputation unit with “A.” The “relative position” is stored in thecomputation unit with “P.”

The former computation element 52 is, for example, a hierarchical neuralnet computation element including an input layer 52 i, a middle layer 52m, and an output layer 52 o. The input layer 52 i includes N computationunits for inputting the values of the second local feature values. Themiddle layer 52 m includes M (here, M=N) computation units. The outputlayer 52 o includes one computation unit for outputting the inclinationangle.

The latter computation element 54 is, for example, a hierarchical neuralnet computation element including an input layer 54 i, a middle layer 54m, and an output layer 54 o. The input layer 54 i includes (N+1)computation units for inputting the values of the first local featurevalues and the inclination angle. The middle layer 54 m includes, forexample, M (here, M=N) computation units. The output layer 54 o includesone computation unit for outputting the relative position between thereference position and the instruction position.

The adder 56 adds the relative position from the latter computationelement 54 to the reference position included in the first featurevalues, to output the instruction position of the electronic pen 14. Theinstruction position is a position corresponding to the peak center ofthe first local distribution, and the resolution is higher than thepitch of the line electrodes 18 x and 18 y.

FIG. 10 is a diagram illustrating an implementation example of theestimator 50 in FIG. 9 . The estimator 50 includes a common computationelement 60, four switches 61, 62, 63, and 64 that can be synchronouslyswitched, and a holding circuit 65. The common computation element 60 isa neural net computation element that inputs (N+1) variables and thatoutputs one variable, and the common computation element 60 can be usedin common as the former computation element 52 or the latter computationelement 54 of FIG. 9 .

The switch 61 switches and outputs one of a first learning parametergroup (that is, a learning parameter group for position computation) anda second learning parameter group (that is, a learning parameter groupfor angle computation) in response to input of a switch signal. Here,the output side of the switch 61 is connected to the common computationelement 60, and the learning parameter group is selectively supplied tothe common computation element 60.

The computation rule of the common computation element 60 is determinedby values of learning parameters included in the learning parametergroup. The learning parameter group includes, for example, coefficientsdescribing activation functions of computation units, “variableparameters” including the coupling strength between computation units,and “fixed parameters” (what is generally called hyperparameters) forspecifying the architecture of learning model. Examples of thehyperparameters include the number of computation units included in eachlayer and the number of middle layers. The architecture is fixed in theimplementation example, and thus, the learning parameter group includesonly the variable parameters.

The switch 62 outputs one of the first local feature values (that is,the input values for position computation) and the second local featurevalues (that is, the input values for angle computation) in response toinput of a switch signal. The output side of the switch 62 is connectedto the input side of the common computation element 60, and the localfeature values are selectively supplied to the common computationelement 60.

The switch 63 switches and outputs one of a held value (here, anestimated value of an inclination angle) in the holding circuit 65 anddummy information (for example, a zero value) in response to input of aswitch signal. The output side of the switch 63 is connected to theinput side of the common computation element 60, and the inclinationangle is supplied to the common computation element 60 only at the timeof execution of the position computation.

The switch 64 switches and outputs one of an output value (here, anestimated value of an instruction position) of the common computationelement 60 and dummy information (for example, a zero value) in responseto input of a switch signal. Therefore, the instruction position isoutput from the switch 64 only at the time of execution of the positioncomputation.

The holding circuit 65 temporarily holds the output value of the commoncomputation element 60. The inclination angle and the instructionposition are alternately held in the holding circuit 65, and inpractice, the held value is read only at the time of execution of theposition computation.

In this way, the estimator 50 of FIGS. 9 and 10 is used to estimate theinstruction position of the electronic pen 14 (step S3). Although theneural network is used to construct the estimator 50 in the example, themethod of machine learning is not limited to this. For example, variousmethods including a logistic regression model, a support vector machine(SVM), a decision tree, a random forest, and a boosting method may beadopted.

In step S4 of FIG. 6 , the pen detection function 28A supplies dataincluding the instruction position and the inclination angle estimatedin step S3 to the host processor 22. For example, the pen detectionfunction 28A may repeat steps S1 to S3 twice to estimate the X-axiscoordinate value and the Y-axis coordinate value and supply thecoordinate values (X, Y) of the instruction position to the hostprocessor 22. Alternatively, the pen detection function 28A may estimatethe coordinate values (X, Y) of the instruction position at the sametime through steps S1 to S3 and supply the coordinate values (X, Y) tothe host processor 22.

In this way, the flow chart of FIG. 6 is finished. The touch IC 20sequentially executes the flow chart at predetermined time intervals todetect the instruction positions according to the movement of theelectronic pen 14.

Comparison of Estimation Accuracy

Next, an improvement effect for the estimation accuracy of the machinelearning estimator 50 will be described with reference to FIG. 11 . FIG.11A is a diagram illustrating estimation accuracy of the instructionposition in the “conventional example,” and FIG. 11B is a diagramillustrating estimation accuracy of the instruction position in the“embodiments.” Here, five inclination angles are set, and the sizes ofinterpolation approximation errors (upper bars) and offset errors (lowerbars) are calculated. Note that a method of using a predeterminedinterpolation function for the signal distribution to calculate thepositions Q1 and Q2 is used for comparison (conventional example).

As illustrated in FIG. 11A, substantially constant interpolationapproximation errors occur regardless of the inclination angle in theconventional example, and the offset errors increase with an increase inthe inclination angle. On the other hand, as illustrated in FIG. 11B,the interpolation approximation errors in the embodiments are reduced tohalf or less than half the conventional example, and the offset errorsare small regardless of the inclination angle.

Conclusion of First Embodiment

In this way, the touch IC 20 is a pen state detection circuit thatdetects the state of the electronic pen 14 including a first electrode,on the basis of the signal distribution detected by the capacitancetouch sensor 18 including a plurality of sensor electrodes (lineelectrodes 18 x and 18 y) arranged in a plane shape. Further, the touchIC 20 (one or a plurality of processors) acquires, from the touch sensor18, the first signal distribution indicating the change in capacitanceassociated with the approach of the first electrode (S1 of FIG. 6 ) anduses the machine learning estimator 50 to estimate the instructionposition or the inclination angle of the electronic pen 14 from thefirst feature values related to the first signal distribution (S3).Further, the first feature values include the first local feature valuesrelated to the first local distribution corresponding to the lineelectrodes 18 x and 18 y in a number fewer than the number of arrangedline electrodes 18 x and 18 y exhibiting the first signal distribution.

Alternatively, when the electronic pen 14 includes the first electrodeand a second electrode, the touch IC 20 (one or a plurality ofprocessors) acquires, from the touch sensor 18, the first signaldistribution indicating the change in capacitance associated with theapproach of the first electrode and the second signal distributionindicating the change in capacitance associated with the approach of thesecond electrode (S1 in FIG. 6 ) and uses the machine learning estimator50 to estimate the instruction position or the inclination angle of theelectronic pen 14 from the first feature values related to the firstsignal distribution and the second feature values related to the secondsignal distribution (S3). Further, the first feature values include thefirst local feature values corresponding to the line electrodes 18 x and18 y in a number fewer than the number of arranged line electrodes 18 xand 18 y exhibiting the first signal distribution, and the secondfeature values include the second local feature values related to thesecond local distribution corresponding to the line electrodes 18 x and18 y in a number fewer than the number of arranged line electrodes 18 xand 18 y exhibiting the second signal distribution.

In this way, the machine learning estimator 50 can be used to extractpotential detection patterns through machine learning, and thisfacilitates appropriate reflection of the tendency of the detectionpatterns in estimating the instruction position or the inclinationangle. This improves the estimation accuracy of the pen state in theelectronic pen 14 including at least one electrode. In addition, thelocal feature values related to the local distribution corresponding tothe line electrodes 18 x and 18 y in a number fewer than the number ofarranged line electrodes 18 x and 18 y exhibiting the signaldistribution can be used to reduce the processing load of the estimator50 to which the local feature values are to be input.

In addition, the first electrode may be the tip electrode 30 that has ashape symmetrical with respect to the axis of the electronic pen 14 andthat is provided at the tip of the electronic pen 14, and the secondelectrode may be the upper electrode 32 that has a shape symmetricalwith respect to the axis of the electronic pen 14 and that is providedon the base end side of the tip electrode 30. The relation between theinclination angle and the detection position of the electronic pen 14tends to vary according to the three-dimensional shape of the upperelectrode 32, making the improvement effect for the estimation accuracymore noticeable.

In addition, the first local feature values and/or the second localfeature values may include a certain number of pieces of data regardlessof the number of arranged line electrodes 18 x and 18 y. The constantnumber of data used for estimation can make a uniform estimateindependent of the configuration of the touch sensor 18 (that is, thenumber of arranged line electrodes 18 x and 18 y).

In addition, the first (or second) local distribution may be adistribution with a relatively large change in capacitance in the first(or second) signal distribution. The first (or second) local featurevalues excluding the signal distribution with a relatively small changein capacitance as compared to the first (or second) local distributionare used, making the improvement effect for the estimation accuracy morenoticeable.

In addition, the first feature values may further include the referenceposition of the first local distribution in the sensor coordinate systemdefined on the detection surface of the touch sensor 18. The estimator50 may be able to execute position computation with the relativeposition between the reference position and the instruction position asan output value. The touch IC 20 may add the relative position to thereference position to estimate the instruction position.

In addition, the estimator 50 may be able to sequentially execute anglecomputation with the second local feature values as input values andwith the inclination angle as an output value; and position computationwith the first local feature values and the inclination angle as inputvalues and with the relative position as an output value. Theinclination angle highly correlated with the instruction position isexplicitly used to perform the position computation, and this furtherincreases the estimation accuracy of the instruction position.

Further, the estimator 50 may include the switch 61 that can switch andoutput one of the learning parameter group for angle computation and thelearning parameter group for position computation; the switch 62 thatcan switch and output one of the input value for angle computation andthe input value for position computation; and the common computationelement 60 that can selectively execute the angle computation or theposition computation according to the switch of the switches 61 and 62.As a result, the configuration of the computation element is simplerthan that in the case where the computation elements used for twopurposes are separately provided.

In addition, the first local feature values may include feature valuesindicating the tilts of the first local distribution or the absolutevalues of the tilts, and the second local feature values may includefeature values indicating the tilts of the second local distribution orthe absolute values of the tilts. The local feature values tend tostrongly characterize the detection pattern, making it easier to improvethe accuracy.

Modifications of First Embodiment

Next, first to fifth modifications of the first embodiment will bedescribed with reference to FIGS. 12 to 15 . Note that the samereference signs are provided to constituent elements similar to those ofthe case of the first embodiment, and the description may not berepeated.

First Modification

FIG. 12A is a block diagram illustrating a pen detection function 28Baccording to the first modification of the first embodiment. The pendetection function 28B includes the signal acquisition unit 40, thefeature value calculation unit 42, and a position estimation unit 80configured differently from that in the first embodiment. That is, thepen detection function 28B is different from the configuration of thepen detection function 28A of FIG. 5 in that the angle estimation unit44 is not provided.

FIG. 12B is a diagram illustrating a configuration of an estimator 82included in the pen detection function 28B of FIG. 12A. The estimator 82corresponds to the position estimation unit 80 illustrated in FIG. 12A.The estimator 82 is, for example, a hierarchical neural net computationelement including an input layer 82 i, a middle layer 82 m, and anoutput layer 82 o. The input layer 82 i includes 2N computation unitsfor inputting the values of the first local feature values and thesecond local feature values. The middle layer 82 m includes M (here,M=2N) computation units. The output layer 82 o includes one computationunit for outputting the relative position between the reference positionand the instruction position.

In this way, the estimator 82 of the pen detection function 28B mayexecute position computation with the first local feature values and thesecond local feature values as input values and with the relativeposition as an output value. When this configuration is adopted, theinstruction position of the electronic pen 14 can be estimated with highaccuracy as in the estimator 50 (FIG. 9 ) of the first embodiment.

Second Modification

FIG. 13A is a block diagram illustrating a pen detection function 28Caccording to the second modification of the first embodiment. The pendetection function 28C includes the signal acquisition unit 40, thefeature value calculation unit 42, a feature value combining unit 90,and a position estimation unit 92 with a function different from that inthe first modification. That is, the pen detection function 28C isdifferent from the pen detection function 28B of the first modificationin that the feature value combining unit 90 is provided.

FIG. 13B is a diagram illustrating a configuration of an estimator 94included in the pen detection function 28C of FIG. 13A. The estimator 94includes a combiner 96 and a computation element 98. The combiner 96corresponds to the feature value combining unit 90 illustrated in FIG.13A, and the computation element 98 corresponds to the positionestimation unit 92 illustrated in FIG. 13A.

The combiner 96 includes a computation element that outputs thirdfeature values (for example, a difference or ratio of local featurevalues, an average of reference positions, and the like) indicatingrelative values between the first feature values and the second featurevalues. Note that the values of the “third feature values” obtained bycombining are stored in computation units with “C.”

The computation element 98 is, for example, a hierarchical neural netcomputation element including an input layer 98 i, a middle layer 98 m,and an output layer 980. The input layer 98 i includes N computationunits for inputting the values of the third feature values. The middlelayer 98 m includes M (here, M=N) computation units. The output layer 98o includes one computation unit for outputting the relative positionbetween the reference position and the instruction position. Note thatthe computation element 98 may be able to output the inclination anglein addition to or instead of the relative position.

In this way, the estimator 94 of the pen detection function 28C mayinclude the combiner 96 that combines the first feature values and thesecond feature values to output the third feature values; and thecomputation element 98 that sets the third feature values as inputvalues and sets the instruction position or the inclination angle as anoutput value. When this configuration is adopted, the instructionposition of the electronic pen 14 can also be estimated with highaccuracy as in the estimator 50 (FIG. 9 ) of the first embodiment.

Third Modification

FIG. 14A is a block diagram illustrating a pen detection function 28Daccording to the third modification of the first embodiment. The pendetection function 28D includes the signal acquisition unit 40, thefeature value calculation unit 42, the feature value combining unit 90,and a position estimation unit 100 with a function different from thatin the second modification.

FIG. 14B is a diagram illustrating a configuration of an estimator 102included in the pen detection function 28D of FIG. 14A. The estimator102 includes a common computation element 104 and a switch 106 andcorresponds to the position estimation unit 100 illustrated in FIG. 14A.The common computation element 104 is a neural net computation elementthat inputs third local feature values (N variables) from the featurevalue combining unit 90 illustrated in FIG. 14A and that outputs therelative position (one variable). Note that the common computationelement 104 may be able to output the inclination angle in addition toor instead of the relative position.

The switch 106 switches and outputs one of the first learning parametergroup (that is, a learning parameter group suitable for the contactstate) and the second learning parameter group (that is, a learningparameter group suitable for the hover state) in response to input of aswitch signal. Here, the output side of the switch 106 is connected tothe common computation element 104, and the learning parameter group isselectively supplied to the common computation element 104.

Note that the “contact state” denotes a state in which the tip portionof the electronic pen 14 is in touch with the detection surface of theelectronic device 12. On the other hand, the “hover state” denotes astate in which the tip portion of the electronic pen 14 is not in touchwith the detection surface of the electronic device 12. For example,when the electronic pen 14 includes a sensor that detects a press of thetip portion, the touch IC 20 can analyze the downlink signal transmittedfrom the electronic pen 14 and identify the two states.

In this way, the instruction position or the inclination angle of theelectronic pen 14 may be estimated by using the estimator 102 in whichdifferent learning parameter groups are set according to whether theelectronic pen 14 is in the contact state or the hover state. In thisway, the tendency of the change in shape of the signal distributionaccording to the clearance between the electronic pen 14 and the touchsensor 18 can be reflected in the computation, and the estimationaccuracy is increased in both states.

Fourth Modification

The line electrodes 18 x and 18 y are connected to one touch IC 20through extension lines not illustrated. That is, the length of wiringvaries according to the positions of the line electrodes 18 x and 18 y,and the degree of change in capacitance, that is, the sensitivity,varies in the detection surface of the touch sensor 18. As a result, aphenomenon, such as distortion of local distribution, may occur, andthis may impair the estimation accuracy of the pen state. Therefore, thenon-uniformity of sensitivity may be taken into account to estimate thepen state.

FIG. 15 is a diagram illustrating a configuration of an estimator 110according to the fourth modification of the first embodiment. Theestimator includes a former computation element 112 and a lattercomputation element 114 sequentially connected in series. The formercomputation element 112 corresponds to the angle estimation unit 44illustrated in FIG. 5 , and the latter computation element 114corresponds to the position estimation unit 46 illustrated in FIG. 5 .

Note that circles in FIG. 15 represent computation units correspondingto neurons of the neural network. The values of the “first local featurevalues” corresponding to the tip electrode 30 are stored in thecomputation units with “T.” The values of the “second local featurevalues” corresponding to the upper electrode 32 are stored in thecomputation units with “U.” The “inclination angle” is stored in thecomputation unit with “A.” The “position” (relative position orinstruction position) is stored in the computation unit with “P.”

The former computation element 112 is, for example, a hierarchicalneural net computation element including an input layer 112 i, a middlelayer 112 m, and an output layer 112 o. The input layer 112 i includes(N+1) computation units for inputting the reference position of thesecond local distribution and the values of the second local featurevalues. The middle layer 112 m includes M (here, M=N) computation units.The output layer 112 o includes one computation unit for outputting theinclination angle.

The latter computation element 114 is, for example, a hierarchicalneural net computation element including an input layer 114 i, a middlelayer 114 m, and an output layer 114 o. The input layer 114 i includes(N+2) computation units for inputting the reference position of thefirst local distribution, the values of the first local feature values,and the inclination angle. The middle layer 114 m includes M (here, M=N)computation units. The output layer 114 o includes one computation unitfor outputting the relative position (or the instruction position).

In this way, the estimator 110 may execute the position computation withthe first local feature values and the reference position as inputvalues and with the relative position or the instruction position as anoutput value. This can reflect the tendency of the change in shape ofthe first local distribution according to the reference position, andthe estimation accuracy is higher than that in the case where thereference position is not input.

Fifth Modification

Although the holding circuit 65 illustrated in FIG. 10 is connected to afirst input side (upper side of FIG. 10 ) of the switch 63 in the firstembodiment, the holding circuit 65 may conversely be connected to asecond input side (lower side of FIG. 10 ) of the switch 63. In thisway, the estimator 50 can use the first local feature values and theinstruction position of last time to estimate the inclination angle ofthis time. Alternatively, a delay circuit can be provided between thecommon computation element 60 and the holding circuit 65 in place of theswitch 63 to make both [1] an estimate of the instruction position ofthis time by further using the inclination angle of this time and [2] anestimate of the inclination angle of this time by further using theinstruction position of last time.

Second Embodiment

Next, a pen detection function 28E of a touch IC 140 according to asecond embodiment will be described with reference to FIGS. 16 to 19 .

Configuration and Operation

The basic configuration in the second embodiment is similar to that inthe first embodiment (FIGS. 1 to 4 ), and the description will thus notbe repeated. However, a case in which the electronic pen 14 (FIG. 2 )includes only the tip electrode 30 will be illustrated.

FIG. 16 is a block diagram illustrating the pen detection function 28Eaccording to the second embodiment. The pen detection function 28Eincludes a signal acquisition unit 142, a feature value calculation unit144, a computation selection unit 146, and a position estimation unit148. Next, an operation of the touch IC 140 associated with execution ofthe pen detection function 28E will be described with reference to aflow chart of FIG. 17 .

In step S11 of FIG. 17 , the signal acquisition unit 142 acquires thesignal distributions from the touch sensor 18 through the scan operationof each of the line electrodes 18 x and 18 y. This operation is similarto that in the first embodiment (step S1 of FIG. 6 ), and the detailswill not be described.

In step S12, the feature value calculation unit 144 uses the signaldistributions acquired in step S11 and calculates the feature valuesrelated to the signal distributions. The feature value calculation unit144 may calculate the same feature values as those in the case of thefirst embodiment (step S2 of FIG. 6 ) or may calculate feature valuesdifferent from those in the case of the first embodiment. For example,the feature value calculation unit 144 may calculate feature valuesrelated to the entire signal distribution instead of the local featurevalues.

In step S13, the computation selection unit 146 selects one of aplurality of learning parameter groups on the basis of the featurevalues calculated in step S12. Prior to the selection, the computationselection unit 146 determines whether or not the projection position ofthe tip electrode 30 interferes with a periphery of the touch sensor 18.

FIG. 18 is a diagram illustrating an example of a definition of a sensorarea 150 included in the touch sensor 18. The sensor coordinate systemis a two-dimensional

Cartesian coordinate system including two axes (X-axis and Y-axis)passing through an origin O. The origin O is a feature point (forexample, an upper left vertex) on the detection surface of the touchsensor 18. The X-Y plane coincides with the plane direction of thedetection surface. A frame-shaped peripheral area 152 corresponding tothe periphery of the touch sensor 18 is set in part of the sensor area150. The shape of the peripheral area 152 (for example, a width,position, size, and the like) can be set in various ways according tothe electronic device 12 or the electronic pen 14. Note that a remainingarea of the sensor area 150 excluding the peripheral area 152 will bereferred to as a general area 154.

FIG. 19 depicts diagrams illustrating a tendency of local feature valuescalculated from various signal distributions. More specifically, FIG.19A illustrates local feature values of a case in which the projectionposition of the tip electrode 30 (FIG. 2 ) included in the electronicpen 14 is in the general area 154. In addition, FIG. 19B illustrateslocal feature values of a case in which the projection position of thetip electrode 30 is in the peripheral area 152. In FIG. 19 , a pluralityof polygonal lines or plots obtained by changing the inclination anglesare displayed on top of each other.

For example, it is assumed that the feature value calculation unit 144extracts six pieces of data with consecutive addresses from the featurevalues calculated across the entire signal distribution and therebycalculates the local feature values corresponding to unit numbers 0 to5. As can be understood from FIG. 19B, part of the signal distributioncannot be detected outside of the sensor area 150, and there may be acase where part of the local feature values is missing. That is, whenthe instruction position is estimated by applying a uniform computationrule to two types of local feature values with significantly differenttendencies of shape, the estimation accuracy may vary.

Thus, the computation selection unit 146 selects a learning parametergroup for general area computation and supplies the learning parametergroup to the position estimation unit 148 when the reference positionincluded in the feature values is in the general area 154. On the otherhand, the computation selection unit 146 selects a learning parametergroup for peripheral area computation and supplies the learningparameter group to the position estimation unit 148 when the referenceposition is in the peripheral area 152.

In step S14 of FIG. 17 , the position estimation unit 148 estimates theinstruction position of the electronic pen 14 from the feature valuescalculated in step S12. Specifically, the position estimation unit 148estimates the instruction position suitable for the projection positionof the tip electrode 30 by using the estimator in which the learningparameter group is selectively set. Note that the position estimationunit 148 may be able to estimate the inclination angle in addition to orinstead of the instruction position.

In step S15, the pen detection function 28E supplies, to the hostprocessor 22, data including the instruction position estimated in stepS14. In this way, the flow chart of FIG. 17 is finished. The touch IC140 sequentially executes the flow chart at predetermined time intervalsto detect the instruction positions according to the movement of theelectronic pen 14.

Conclusion of Second Embodiment

As described above, the touch IC 140 is a pen state detection circuitthat detects the state of the electronic pen 14 including the tipelectrode 30, on the basis of the signal distribution detected by thecapacitance touch sensor 18 including the plurality of line electrodes18 x and 18 y arranged in a plane shape. Further, the touch IC 140 (oneor a plurality of processors) acquires, from the touch sensor 18, thesignal distribution indicating the change in capacitance associated withthe approach of the tip electrode 30 (S11 of FIG. 17 ) and followsdifferent computation rules according to the projection position of thetip electrode 30 on the detection surface of the touch sensor 18, toestimate the instruction position or the inclination angle of theelectronic pen 14 from the feature values related to the signaldistribution (S13 and S14).

In this way, an estimate suitable for the projection position can bemade by application of different computation rules according to theprojection position of the tip electrode 30 included in the electronicpen 14, and this can suppress the reduction in the estimation accuracyof the pen state caused by the relative positional relation between theelectronic pen 14 and the touch sensor 18.

For example, the computation rules may be rules for estimating theinstruction position or the inclination angle of the electronic pen 14,and the touch IC 140 may estimate the instruction position or theinclination angle by using an estimator in which different learningparameter groups are set according to whether or not the projectionposition of the tip electrode 30 interferes with the periphery of thetouch sensor 18.

In addition, the local feature values related to the local distributioncorresponding to the line electrodes 18 x and 18 y in a number fewerthan the number of arranged line electrodes 18 x and 18 y exhibiting thesignal distribution can be used to reduce the processing load of theestimator 50 to which the local feature values are to be input.Alternatively, the local feature values excluding the signaldistribution with a smaller change in capacitance than in the localdistribution are used, making the improvement effect for the estimationaccuracy more noticeable.

Modification of Second Embodiment

Although the computation rule for estimating the instruction position orthe inclination angle of the electronic pen 14 is changed in the secondembodiment, other computation rules may be changed.

FIG. 20 is a block diagram illustrating a pen detection function 28Faccording to a modification of the second embodiment. The pen detectionfunction 28F includes the signal acquisition unit 142, the feature valuecalculation unit 144, a shift processing unit 160, and the positionestimation unit 148. That is, the pen detection function 28F isdifferent from the configuration of the pen detection function 28E ofFIG. 16 in that the shift processing unit 160 is provided in place ofthe computation selection unit 146.

The shift processing unit 160 shifts the positions of the local featurevalues calculated by the feature value calculation unit 144, asnecessary. In terms of function, the shift processing unit 160 does notexecute the shift process when there is no missing of localdistribution, but the shift processing unit 160 executes the shiftprocess when there is missing of local distribution. Specifically, theshift processing unit 160 specifies a rising position or a fallingposition of the local distribution from adjacent differences between thelocal feature values and determines the direction and amount of shift sothat both positions fall within a predetermined range. In this way, whenpart of the local distribution is missing, the addresses of the localfeature values are relatively shifted such that the peak center of thelocal distribution comes closer to the center.

FIG. 21 depicts diagrams illustrating an advantageous effect of theshift process of the local feature values in the peripheral area 152 ofFIG. 18 . More specifically, FIG. 21A illustrates the local featurevalues before the shift process, and FIG. 21B illustrates the localfeature values after the shift process. In FIG. 21 , two polygonal lines(solid line and dashed line) obtained by changing the inclination anglesare displayed on top of each other.

The local feature values of FIG. 21A are calculated by using the localdistributions with the peak centers at the position of unit number 5. Onthe other hand, the addresses of the local feature values illustrated inFIG. 21A are shifted by “2” to the negative side to obtain the localfeature values of FIG. 21B. Through the shift process, the local featurevalues are adjusted such that the peak centers of the localdistributions come to the position of unit number 3. As a result, theaddresses of the local feature values in the peripheral area 152 wherethere may be missing of local distribution can be brought into line withthe addresses of the local feature values in the general area 154 wherethere is no missing of local distribution. This can easily suppress thereduction in the estimation accuracy for the pen state caused by therelative positional relation between the electronic pen 14 and the touchsensor 18.

In this way, the computation rules may be rules for calculating thelocal feature values, and the touch IC 140 may estimate the instructionposition or the inclination angle from the local feature valuescalculated by following different rules according to whether or not theprojection position of the tip electrode 30 interferes with theperiphery of the touch sensor 18. According to the configuration, aneffect (that is, an advantageous effect of suppressing the reduction ofestimation accuracy) similar to that of the second embodiment can alsobe obtained.

Third Embodiment

Next, a pen detection function 28G of a touch IC 200 according to athird embodiment will be described with reference to FIGS. 22 to 27 .

Configuration and Operation

The basic configuration in the third embodiment is similar to that inthe first embodiment (FIGS. 1 to 4 ), and the description will not berepeated. However, a case in which the electronic pen 14 (FIG. 2 )includes only the tip electrode 30 will be illustrated.

FIG. 22A is a block diagram illustrating the pen detection function 28Gaccording to the third embodiment. The pen detection function 28Gincludes a signal acquisition unit 202, a feature value calculation unit204, an autoencoding processing unit (hereinafter, AE processing unit206), and a position estimation unit 208. Alternatively, as illustratedin FIG. 22B, a pen detection function 28H may include the signalacquisition unit 202, the AE processing unit 206, and the positionestimation unit 208. Next, an operation of the touch IC 200 associatedwith execution of the pen detection functions 28G and 28H will bedescribed with reference to a flow chart of FIG. 23 .

In step S21 of FIG. 23 , the signal acquisition unit 202 acquires thesignal distributions from the touch sensor 18 through the scan operationof each of the line electrodes 18 x and 18 y. The operation is similarto that in the first embodiment (step S1 of FIG. 6 ), and the detailswill not be described.

In step S22, the feature value calculation unit 204 uses the signaldistributions acquired in step S21 and calculates the feature valuesrelated to the signal distributions. In the case of the configurationillustrated in FIG. 22A, the feature value calculation unit 204 maycalculate feature values that are the same as or different from those ofthe case of the first embodiment (step S2 of FIG. 6 ). On the otherhand, in the case of the configuration illustrated in FIG. 22B, thefeature values are the signal distribution itself. For example, in theformer case, the feature values related to the entire signaldistribution may be used instead of the local feature values.

In step S23, the AE processing unit 206 applies an autoencoding processdescribed later to the feature values calculated in step S22. In stepS24, the position estimation unit 208 estimates the instruction positionfrom the feature values to which the autoencoding process is applied instep S23. The autoencoding process and the estimation of the pen stateare performed by a machine learning estimator 210.

FIG. 24 is a diagram illustrating a configuration of the estimator 210included in the pen detection functions 28G and 28H of FIG. 22 . Theestimator 210 includes a former computation element 212 and a lattercomputation element 214 connected in series. The former computationelement 212 corresponds to the AE processing unit 206 illustrated inFIGS. 22A and 22B, and the latter computation element 214 corresponds tothe position estimation unit 208 illustrated in FIGS. 22A and 22B. Notethat the values of the “feature values” corresponding to the tipelectrode 30 are stored in computation units labeled 0 to 5.

The estimator 210 is, for example, a five-layered neural net computationelement including a first layer 221, a second layer 222, a third layer223, a fourth layer 224, and a fifth layer 225. The first layer 221includes N computation units for inputting the values of the featurevalues. The second layer 222 includes M (here, M<N) computation units.The third layer 223 includes the same number of (that is, N) computationunits as in the configuration of the first layer 221. The fourth layer224 includes, for example, L (here, L=N) computation units. The fifthlayer 225 includes one computation unit for outputting the instructionposition.

The former computation element 212 is a hierarchical neural networkcomputation element including the first layer 221 as an input layer, thesecond layer 222 as a middle layer, and the third layer 223 as an outputlayer. In the case of this configuration, the first layer 221 and thesecond layer 222 perform a dimension compression function, and thesecond layer 222 and the third layer 223 perform a dimension restorationfunction. A learning parameter group optimized by learning withouttraining is used for the computation process of the former computationelement 212.

The latter computation element 214 is a hierarchical neural networkcomputation element including the third layer 223 as an input layer, thefourth layer 224 as a middle layer, and the fifth layer 225 as an outputlayer. A learning parameter group optimized by learning with training isused for the computation process of the latter computation element 214.

In step S25 of FIG. 23 , the pen detection functions 28G and 28H supplydata including the instruction position estimated in step S24 to thehost processor 22. In this way, the flow chart of FIG. 23 is finished.The touch IC 200 sequentially executes the flow chart at predeterminedtime intervals to detect the instruction positions according to themovement of the electronic pen 14.

Comparison of Estimation Accuracy

Next, an improvement effect for the estimation accuracy of the machinelearning estimator 210 will be described with reference to FIGS. 25 to27 .

FIG. 25 depicts diagrams illustrating variations of the feature valuesbefore the execution of the autoencoding process. More specifically,FIG. 25A is a diagram illustrating a tendency of feature valuescalculated from various signal distributions. In addition, FIG. 25Billustrates a deviation calculated from populations of the featurevalues in FIG. 25A. In FIGS. 25A and 25B, a plurality of polygonal linesor plots obtained by changing the inclination angles are displayed ontop of each other.

FIG. 26 depicts diagrams illustrating variations of the feature valuesafter the execution of the autoencoding process. More specifically, FIG.26A is a diagram illustrating results of applying the autoencodingprocess to the feature values in FIG. 25A. In addition, FIG. 26Billustrates a deviation calculated from populations of the featurevalues in FIG. 26A. In FIGS. 26A and 26B, a plurality of obtainedpolygonal lines or plots are displayed on top of each other.

As can be understood from FIGS. 25B and 26B, the deviation (that is,variation) of the feature values is reduced to half or less than halfbefore and after the autoencoding process. That is, an advantageouseffect of removing noise components mixed in the feature values isobtained by applying the autoencoding process.

FIG. 27A is a diagram illustrating estimation accuracy for theinstruction position in a “reference example.” FIG. 27B is a diagramillustrating estimation accuracy for the instruction position in the“embodiments.” Here, each instruction position is estimated while thecombination of the inclination angle and the amount of added noise ischanged, and the relation between the actual value (unit: mm) of theinstruction position and the estimation error (unit: μm) is expressed ina scatter diagram. Note that, in this comparison (reference example),only the latter computation element 214 of FIG. 24 is used to estimatethe instruction position. It can be understood by comparing the scatterdiagrams that the estimation accuracy for the instruction position isimproved by applying the autoencoding process to the feature values.

Conclusion of Third Embodiment

As described above, the touch IC 200 is a pen state detection circuitthat detects the state of the electronic pen 14 including at least oneelectrode, on the basis of the signal distribution detected by thecapacitance touch sensor 18 including the plurality of sensor electrodes(line electrodes 18 x and 18 y) arranged in a plane shape. Further, thetouch IC 200 (one or a plurality of processors) acquires, from the touchsensor 18, the signal distribution indicating the change in capacitanceassociated with the approach of the electrode (S21 of FIG. 23 ) andsequentially applies the dimension compression process and the dimensionrestoration process to the feature values related to the signaldistribution, to thereby execute the autoencoding process of outputtingthe feature values equal to the number of dimensions of the input (S23).The touch IC 200 estimates the instruction position or the inclinationangle of the electronic pen 14 by using the feature values to which theautoencoding process is applied (S24).

In this way, the autoencoding process can be applied to the featurevalues related to the signal distribution, to remove the noisecomponents included in the feature values, and the estimation accuracyof the instruction position is improved. Particularly, the estimationaccuracy of the instruction position is further increased by using themachine learning estimator 210 (more specifically, the lattercomputation element 214). Note that the feature values may be one of orboth the first feature values and the second feature values in the firstembodiment.

In addition, the touch IC 200 may use the machine learning estimator 210to estimate the instruction position or the instruction angle from thefeature values to which the autoencoding process is applied. Forexample, in the first embodiment and this modification, the AEprocessing unit 206 may be added to at least one section of [1] theinput side of the position estimation unit 46 (FIG. 5 ), [2] the inputside of the angle estimation unit 68 (FIG. 5 ), [3] the input side ofthe position estimation unit 80 (FIG. 12 ), [4] the input side of thefeature value combining unit 90 (FIGS. 13 and 14 ), and [5] the inputside of the position estimation unit 100 (FIG. 14 ).

Fourth Embodiment

Next, an input system 250 as a pen state detection system according to afourth embodiment will be described with reference to FIGS. 28 to 31 .

Overall Configuration

FIG. 28 is an overall configuration diagram of the input system 250 as apen state detection system according to the fourth embodiment. The inputsystem 250 includes one or a plurality of electronic devices 12, one ora plurality of electronic pens 14, and a learning computer 252. Eachelectronic device 12 can perform two-way communication with the learningcomputer 252 through a network NW.

The learning computer 252 is a server apparatus that performs amanagement function of a learning parameter group LP suitable for theelectronic pen 14. Specifically, the learning computer 252 includes acommunication unit 254, a control unit 256, and a storage unit 258.

The communication unit 254 includes a communication interface that cantransmit and receive electrical signals to and from externalapparatuses. Thus, the learning computer 252 can transmit, to theelectronic device 12, the learning parameter group LP corresponding tothe electronic pen 14 according to a request from the electronic device12.

The control unit 256 may be a general-purpose processor including a CPUor may be a special-purpose processor including a GPU or an FPGA (FieldProgrammable Gate Array). The control unit 256 reads and executesprograms stored in a memory including the storage unit 258, to functionas a data processing unit 260, a learning processing unit 262, and alearner 264.

The storage unit 258 includes, for example, a non-transitory storagemedium including a hard disk drive (HDD: Hard Disk Drive) and a solidstate drive (SSD: Solid State Drive). In the example of FIG. 28 , atraining data group 266 including a set of training data TD and adatabase (hereinafter, parameter DB 268) related to learning parametersare stored in the storage unit 258.

Functional Block Diagram

FIG. 29 is a functional block diagram related to a learning process ofthe control unit 256 illustrated in FIG. 28 . The control unit 256 usesthe prepared training data TD to execute a learning process for thelearner 264 and thereby create one or more types of learning parametergroups LP to be applied to the electronic pen 14. FIG. 29 schematicallyillustrates the learning processing unit 262 and the learner 264 amongthe functional units that can be executed by the control unit 256.

The learning processing unit 262 uses a plurality of sets of trainingdata TD to execute the learning process for the learner 264 (in otherwords, optimization process of learning parameter groups LP).Specifically, the learning processing unit 262 includes a dataacquisition unit 270, a learning error calculation unit 272, a parameterupdate unit 274, and a convergence determination unit 276.

The data acquisition unit 270 acquires one or a plurality of sets oftraining data TD from the prepared training data group 266. The trainingdata TD includes data sets of input vectors and output values and isobtained by actual measurement or calculation simulation. For example,in the case of “actual measurement,” a plurality of positions on thesensor plane may be randomly selected, and the signal distributions atthe positions may be measured to create the training data TD.Furthermore, in the case of “calculation simulation,” one of a physicalsimulation including electromagnetic field analysis or electric circuitanalysis and a mathematical simulation including a sampling process, aninterpolation process, or noise addition may be used to create thetraining data TD.

The learning error calculation unit 272 calculates an error(hereinafter, referred to as a learning error) between an output valuefrom the learner 284 with respect to the input vector of the trainingdata TD and an output value of the training data TD. The learning errormay be an L1-norm function for returning an absolute value of thedifference or may be an L2-norm function for returning a square value ofthe difference. In addition, the learning error may be an error in oneset of training data TD (in a case of online learning) or may be anerror related to a plurality of sets of training data TD (in a case ofbatch learning or mini-batch learning).

The parameter update unit 274 updates variable parameters of thelearning parameter group LP in order to reduce the learning errorcalculated by the learning error calculation unit 272. Examples of anupdate algorithm that can be used include various methods includinggradient descent, stochastic gradient descent, momentum method, andRMSprop.

The convergence determination unit 276 determines whether or not apredetermined convergence condition is satisfied at the time of currentlearning. Examples of the convergence condition include that [1] thelearning error is sufficiently reduced, [2] the amount of update of thelearning error is sufficiently reduced, and [3] the number ofrepetitions of learning has reached an upper limit.

Setting Method for Learning Parameter Group LP

FIG. 30 is a diagram illustrating a first example of a setting methodfor the learning parameter group LP. First, the learning computer 252uses the training data TD related to various types of electronic pens 14and performs machine learning. Consequently, a typical learningparameter group LP of the electronic pens 14 is generated. Further, amanufacturing worker of the touch IC 20, 140, or 200 performs anoperation of writing, to a memory 280, the learning parameter group LPstored in the parameter DB 288. In this way, the touch IC 20, 140, or200 provided with the memory 280 can fulfill the estimation function ofthe pen state while the touch IC 20, 140, or 200 is incorporated intothe electronic device 12.

FIG. 31 is a diagram illustrating a second example of the setting methodfor the learning parameter group LP. [1] First, the electronic device 12attempts to pair with an electronic pen 14 near the electronic device12. [2] When the pairing is successful and the electronic pen 14 isdetected, the electronic device 12 transmits, to the learning computer252, a request signal including the identification information (that is,pen ID) acquired from the electronic pen 14. [3] The data processingunit 260 of the learning computer 252 searches the parameter DB 268 toacquire the learning parameter group LP corresponding to the pen ID. [4]The learning computer 252 transmits the acquired learning parametergroup LP to the electronic device 12 as a transmission source of therequest signal. [5] The electronic device 12 sets the learning parametergroup LP so that the touch IC 20, 140, or 200 can use the learningparameter group LP. In this way, the touch IC 20, 140, or 200 canfulfill the pen state estimation function.

Conclusion of Fourth Embodiment

In this way, the input system 250 includes the electronic device 12including the touch IC 20, 140, or 200; the electronic pen 14 used alongwith the electronic device 12; and the learning computer 252 that canperform two-way communication with the electronic device 12 and that canstore the learning parameter group LP of the estimator constructed onthe touch IC 20, 140, or 200, the estimator estimating the instructionposition or the inclination angle of the electronic pen 14.

Furthermore, when the electronic pen 14 is detected, the electronicdevice 12 requests the learning computer 252 to transmit the learningparameter group LP corresponding to the electronic pen 14 and holds thelearning parameter group LP from the learning computer 252 so that thetouch IC 20, 140, or 200 can use the learning parameter group LP. Inthis way, an estimate suitable for the electronic pen 14 can be madeeven when the combination of the electronic device 12 and the electronicpen 14 is changed.

DESCRIPTION OF REFERENCE SYMBOLS

10, 250: Input system (pen state detection system)

12: Electronic device

14: Electronic pen

16: Finger

18: Touch sensor

18 x, 18 y: Line electrode

20, 140, 200: Touch IC (pen state detection circuit)

22: Host processor

28 (A, B, C, D, E, F, G, H) : Pen detection function

30: Tip electrode (first electrode)

32: Upper electrode (second electrode)

34: Oscillation circuit

50, 82, 94, 102, 100, 210: Estimator

52, 112, 212: Former computation element

54, 114, 214: Latter computation element

60, 104: Common computation element

61: Switch (first switch)

62: Switch (second switch)

250: Learning computer (server apparatus)

LP: Learning parameter group

TD: Training data

The various embodiments described above can be combined to providefurther embodiments. All of the U.S. patents, U.S. patent applicationpublications, U.S. patent applications, foreign patents, foreign patentapplications and non-patent publications referred to in thisspecification and/or listed in the Application Data Sheet areincorporated herein by reference, in their entirety. Aspects of theembodiments can be modified, if necessary to employ concepts of thevarious patents, applications and publications to provide yet furtherembodiments.

These and other changes can be made to the embodiments in light of theabove-detailed description. In general, in the following claims, theterms used should not be construed to limit the claims to the specificembodiments disclosed in the specification and the claims, but should beconstrued to include all possible embodiments along with the full scopeof equivalents to which such claims are entitled. Accordingly, theclaims are not limited by the disclosure.

1. A pen state detection circuit that detects a state of an electronicpen including a first electrode, on a basis of a signal distributiondetected by a capacitance touch sensor including a plurality of sensorelectrodes arranged in a plane shape, the pen state detection circuitexecuting: an acquisition step of acquiring, from the touch sensor, afirst signal distribution indicating a change in capacitance associatedwith approach of the first electrode, and an estimation step of using amachine learning estimator to estimate an instruction position or aninclination angle of the electronic pen from first feature valuesrelated to the first signal distribution, wherein the first featurevalues include first local feature values related to a first localdistribution corresponding to sensor electrodes in a number fewer thanthe number of arranged sensor electrodes exhibiting the first signaldistribution, and in the estimation step, the instruction position orthe inclination angle is estimated by using the machine learningestimator in which different learning parameter groups are set accordingto whether the electronic pen is in a contact state or a hover state. 2.The pen state detection circuit according to claim 1, wherein the firstlocal feature values include a certain number of pieces of dataregardless of the number of arranged sensor electrodes.
 3. The pen statedetection circuit according to claim 1, wherein the first feature valuesfurther include a reference position of the first local distribution ina sensor coordinate system defined on a detection surface of the touchsensor, the machine learning estimator is configured to be capable ofexecuting position computation, with a relative position between thereference position and the instruction position as an output value, andin the estimation step, the relative position is added to the referenceposition to estimate the instruction position.
 4. The pen statedetection circuit according to claim 1, wherein the electronic penfurther includes a second electrode different from the first electrode,in the acquisition step, a second signal distribution indicating achange in capacitance associated with approach of the second electrodeis further acquired from the touch sensor, in the estimation step, theinstruction position or the inclination angle is estimated from thefirst feature values and second feature values related to the secondsignal distribution, and the second feature values include second localfeature values related to a second local distribution corresponding tosensor electrodes in a number fewer than the number of arranged sensorelectrodes exhibiting the second signal distribution.
 5. The pen statedetection circuit according to claim 4, wherein the first electrode is atip electrode that has a shape symmetrical with respect to an axis ofthe electronic pen and that is provided at a tip of the electronic pen,and the second electrode is an upper electrode that has a shapesymmetrical with respect to the axis of the electronic pen and that isprovided on a base end side of the tip electrode.
 6. The pen statedetection circuit according to claim 5, wherein the machine learningestimator is configured to be capable of sequentially executing: anglecomputation with the second local feature values as input values andwith the inclination angle as an output value, and position computationwith the first local feature values and the inclination angle as inputvalues and with the relative position as an output value.
 7. The penstate detection circuit according to claim 6, wherein the machinelearning estimator includes: a first switch that is capable of switchingand outputting one of a learning parameter group for the anglecomputation and a learning parameter group for the position computation,a second switch that is capable of switching and outputting one of theinput values for the angle computation and the input values for theposition computation, and a common computation element that is capableof selectively executing the angle computation or the positioncomputation according to the switch of the first switch and the secondswitch.
 8. The pen state detection circuit according to claim 4, whereinthe machine learning estimator is configured to be capable of executingposition computation with the first local feature values and the secondlocal feature values as input values and with the relative position asan output value.
 9. The pen state detection circuit according to claim4, wherein the machine learning estimator includes: a combiner thatcombines the first feature values and the second feature values tooutput third feature values, and a computation element that sets thethird feature values as input values and sets the instruction positionas an output value.
 10. The pen state detection circuit according toclaim 4, wherein the first local feature values include feature valuesindicating tilts of the first local distribution or absolute values ofthe tilts, and the second local feature values include feature valuesindicating tilts of the second local distribution or absolute values ofthe tilts.
 11. The pen state detection circuit according to claim 1,wherein the machine learning is learning with training using trainingdata obtained by actual measurement or calculation simulation.
 12. Thepen state detection circuit according to claim 1, wherein the pen statedetection circuit further executes a processing step of sequentiallyapplying a dimension compression process and a dimension restorationprocess to the first feature values to execute an autoencoding processof obtaining first feature values equivalent to the number of dimensionsof input, and in the estimation step, the machine learning estimator isused to estimate the instruction position or the inclination angle fromthe first feature values to which the autoencoding process is applied.13. The pen state detection circuit according to claim 1, wherein in theestimation step, the instruction position or the inclination angle isestimated from the first feature values by following differentcomputation rules according to a projection position of the firstelectrode on a detection surface of the touch sensor.
 14. The pen statedetection circuit according to claim 13, wherein the computation rulesare rules for estimating the instruction position or the inclinationangle, and in the estimation step, the instruction position or theinclination angle is estimated by using the machine learning estimatorin which different learning parameter groups are set according towhether or not the projection position of the first electrode interfereswith a periphery of the touch sensor.
 15. The pen state detectioncircuit according to claim 13, wherein the computation rules are rulesfor calculating the first local feature values, and in the estimationstep, the instruction position or the inclination angle is estimatedfrom the first local feature values calculated by following differentcomputation rules according to whether or not the projection position ofthe first electrode interferes with a periphery of the touch sensor. 16.The pen state detection circuit according to claim 1, which is includedin a pen state detection system including: an electronic deviceincluding the pen state detection circuit; the electronic pen used alongwith the electronic device; and a server apparatus that is configured tobe capable of performing two-way communication with the electronicdevice and storing learning parameter groups of the machine learningestimator constructed on the pen state detection circuit, wherein theelectronic device is triggered by detection of the electronic pen, torequest the server apparatus to transmit a learning parameter groupcorresponding to the electronic pen.
 17. A pen state detection method ofdetecting a state of an electronic pen including an electrode, on abasis of a signal distribution detected by a capacitance touch sensorincluding a plurality of sensor electrodes arranged in a plane shape,the pen state detection method comprising: an acquisition step ofacquiring, from the touch sensor, a signal distribution indicating achange in capacitance associated with approach of the electrode, and anestimation step of using a machine learning estimator to estimate aninstruction position of the electronic pen from feature values relatedto the signal distribution, wherein the feature values include localfeature values related to a local distribution corresponding to sensorelectrodes in a number fewer than the number of arranged sensorelectrodes exhibiting the signal distribution, and in the estimationstep, the instruction position or the inclination angle is estimated byusing the machine learning estimator in which different learningparameter groups are set according to whether the electronic pen is in acontact state or a hover state.
 18. The pen state detection methodaccording to claim 17, wherein the estimation step includes followingdifferent computation rules according to a projection position of theelectrode on a detection surface of the touch sensor.